From: Alessandro Bono Date: Sun, 6 Nov 2022 11:17:15 +0000 (+0100) Subject: overview: Start animation after setting coverPane initial state X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~405^2^2~250 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=cf47b4a34733d8be29a49eca46abca0c4b94b44c;p=gnome-shell.git overview: Start animation after setting coverPane initial state Since commit 7bd98f3f5fb7e0d1220646b8a4ee7073534a8e8f the onComplete callback is called right away when animations are disabled. As side effect, now this._coverPane gets shown/hidden in the wrong order. Start the animation after setting this._coverPane initial state, so that the animation callback can set the this._coverPane final state without it being overwritten later. Move the animation also after emitting the showing and hiding signals. So that the order showing -> shown and hiding -> hidden is still preserved when animations are disabled. Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6096 Part-of: --- diff --git a/js/ui/overview.js b/js/ui/overview.js index 98b1fa8f7..dc6ca5780 100644 --- a/js/ui/overview.js +++ b/js/ui/overview.js @@ -519,13 +519,13 @@ var Overview = class extends Signals.EventEmitter { Meta.disable_unredirect_for_display(global.display); - this._overview.prepareToEnterOverview(); - this._overview.animateToOverview(state, () => this._showDone()); - Main.layoutManager.overviewGroup.set_child_above_sibling( this._coverPane, null); this._coverPane.show(); + + this._overview.prepareToEnterOverview(); this.emit('showing'); + this._overview.animateToOverview(state, () => this._showDone()); } _showDone() { @@ -573,13 +573,13 @@ var Overview = class extends Signals.EventEmitter { this._animationInProgress = true; this._visibleTarget = false; - this._overview.prepareToLeaveOverview(); - this._overview.animateFromOverview(() => this._hideDone()); - Main.layoutManager.overviewGroup.set_child_above_sibling( this._coverPane, null); this._coverPane.show(); + + this._overview.prepareToLeaveOverview(); this.emit('hiding'); + this._overview.animateFromOverview(() => this._hideDone()); } _hideDone() {